import request from '@/utils/request'

// 查询在线用户列表
export function list(query) {
  return request({
    url: '/monitor/online/list',
    method: 'get',
    params: query
  })
}

// 根据 tokenId 获取单个在线用户详情
export function getOnline(tokenId) {
  return request({
    url: '/monitor/online/' + tokenId,
    method: 'get'
  })
}

// 强退用户
export function forceLogout(tokenId) {
  return request({
    url: '/monitor/online/' + tokenId,
    method: 'delete'
  })
}

/* --- 别名：兼容旧 import --- */
export { forceLogout as delOnline }